﻿@model User

<form method="post" asp-action="Create">
    <div class="border p-3 mt-4">
        <div class="row pb-2">
            <h2 class="text-primary">添加用户</h2>
            <hr/>
        </div>
        <div asp-validation-summary="All"></div>
        <div class="mb-3">
            <label asp-for="Name">姓名</label>
            <input asp-for="Name" class="form-control" />
            <span asp-validation-for="Name" class="btn-danger"></span> @* 验证状态*@
        </div>
        <div class="mb-3">
            <label asp-for="Phone">手机号</label>
            <input asp-for="Phone" class="form-control" />
            <span asp-validation-for="Name" class="btn-danger"></span>
        </div>
        <div class="mb-3">
            <label asp-for="Password">密码</label>
            <input asp-for="Password" class="form-control" />
            <span asp-validation-for="Name" class="btn-danger"></span>
        </div>
        <div class="mb-3">
            <label asp-for="Roleid">角色id</label>
            <p>1是员工、2是管理员、3是人事、4是部长</p>
            <input asp-for="Roleid" class="form-control" />
            <span asp-validation-for="Roleid" class="btn-danger"></span>
        </div>
        <button type="submit" class="btn btn-primary" style="width:150px">添加</button>
        <a asp-controller="User" asp-action="index" class="btn btn-secondary" style="150px">返回 </a>
    </div>
</form>
@section Scripts{
    @{
        <partial name = "_ValidationScriptsPartial"/>
    }
    }